package tut.Struct.Struct;

import java.util.AbstractSet;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.LinkedList;
import java.util.Map;

public class MapDemo {
	public static void main(String args[]) {
		Map<String,  String> m = new HashMap<String,  String>();
		m.put("1", "m");
		m.put("2", "h");
		m.put("1", "b");
		m.put("", "emp");
		m.put(null, "3sa");

		System.out.println(m);


		System.out.println(m.containsKey(null));
		System.out.println(m.containsKey("1"));
		System.out.println(m.containsKey("111"));
		//Iterator<String> it = m.entrySet();


		System.out.println("---------HashTable---------");
		Hashtable<String, String> ht = new Hashtable<String, String>();
		ht.put("1", "m");
		ht.put("2", "h");
		ht.put("2", "b");
		ht.put(null, "asd2");
		//System.out.println(ht);
		try {
			//ht.put(null, "3sa");
		} catch (Exception e) {
			e.printStackTrace();
		}

		LinkedList e = new LinkedList();
		ArrayList s = new ArrayList();

		AbstractSet a = new HashSet();
	}
}
